package com.beaut.project.util;

import java.io.IOException;
import java.net.MalformedURLException;

import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlPage;

import yh.core.util.PluginThread;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String []args){
		String urlBack="http://localhost:8880/fl/springMVC/workFlow/backToGDUpdateDemo?key=5cbf1525-96a7-4695-9276-fde01b7b0b52&status=2";
	
		WebClient wc = new WebClient();  
        wc.getOptions().setJavaScriptEnabled(true); //启用JS解释器，默认为true  
        wc.getOptions().setCssEnabled(false); //禁用css支持  
        wc.getOptions().setThrowExceptionOnScriptError(false); //js运行错误时，是否抛出异常  
        wc.getOptions().setTimeout(10000); //设置连接超时时间 ，这里是10S。如果为0，则无限期等待  
	  
	       try {
//	    	   System.out.println(urlBack);
		HtmlPage page = wc.getPage(urlBack);
//		System.out.println(page.getBody().toString());
	} catch (FailingHttpStatusCodeException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} catch (MalformedURLException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}  
		
		
	}

}
